package com.fuxin.hanfu.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Message {
    private Integer id;

    private String userName;

    private String messageContent;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date release;

    private String avatar;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getuserName() {
        return userName;
    }

    public void setuserName(String userName) {
        this.userName = userName;
    }

    public String getmessageContent() {
        return messageContent;
    }

    public void setmessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public Date getRelease() {
        return release;
    }

    public void setRelease(Date release) {
        this.release = release;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userName=").append(userName);
        sb.append(", messageContent=").append(messageContent);
        sb.append(", release=").append(release);
        sb.append(", avatar=").append(avatar);
        sb.append("]");
        return sb.toString();
    }
}